package ldh.fx.adminfx.commpont.grid;

public class Pagination implements Pageable {
    private long pageNo;
    private int pageSize = 10;
    private String order;

    public Pagination() {
    }

    public Pagination(long pageNo, int pageSize) {
        this.pageNo = pageNo;
        this.pageSize = pageSize;
    }

    public long getStart() {
        return (this.pageNo - 1L) * (long)this.pageSize;
    }

    public int getLength() {
        return this.pageSize;
    }

    public long getEnd() {
        return this.getStart() + (long)this.pageSize;
    }

    public long getPageNo() {
        return this.pageNo;
    }

    public void setPageNo(long pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
}
